package com.wxzz.elearing.user.service.openfeign;

import com.alibaba.fastjson.JSONObject;
import com.wxzz.elearing.user.service.openfeign.sentinel.ExamApiFeignImpl;
import com.wxzz.elearning.common.vo.ReturnVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

@FeignClient(value = "2125-wxzzlearn-course-application",fallback = ExamApiFeignImpl.class)
public interface IExamApiFeign {

    /**
     * 查询考试绑定的用户
     *
     * @param examId
     * @param wxUserIds
     * @return
     */
    @RequestMapping(value = "/exam-api/selectWxUserExam/{examId}", method = RequestMethod.POST,consumes = MediaType.APPLICATION_JSON_VALUE)
    ReturnVO<List<JSONObject>> selectWxUserExam(@PathVariable(value = "examId") Long examId, @RequestBody List<Long> wxUserIds);
}

